# @Time:2021/6/8 13:40
# @Author:5120195554王欣霏
# -*- coding = utf-8 -*-

# 该类是tiled制作的图片的渲染与显示
import pygame
import utils.tiled_render as tiled


class TileScene(object):
    # 构造函数init
    def __init__(self, path):  # 根据path的不同载入不同的瓦格图象
        self.tiled_path = path
        self.tiled = tiled.TiledRenderer(self.tiled_path)  # 构造tiled_render类的对象进行使用
        self.surface = pygame.Surface(self.tiled.pixel_size)  # 背景图层
        self.tiled.render_map(self.surface)  # 渲染图片
